<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
      let printNumbers = function (n) {
          let nums = new Array(Math.pow(10, n) - 1);
          let newNums = nums.fill(0).map((value, index) => {
            value = index + 1;
            // console.log(value);
            // console.log(index);
            return value;
          })

          return newNums;
        };

        printNumbers(2);
  </script>
</body>
</html>